package com.framework.common.model;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 * 包含id主键的基类
 */
@MappedSuperclass
public class BaseModelMybatisWithId implements IBaseModel, Serializable {
    @ApiModelProperty(value = "编号")
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Version
    private Integer version;

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
